package com.yuwei.home.adapter

import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.yuwei.home.R
import com.yuwei.http.entity.NoticeEntityItem


class HomeNoticeAdapter : BaseQuickAdapter<NoticeEntityItem, BaseViewHolder>(
    R.layout.home_notice_item
) {

    override fun convert(holder: BaseViewHolder, item: NoticeEntityItem) {
        val title = holder.getView<TextView>(R.id.notice_title)
        val content = holder.getView<TextView>(R.id.notice_content)
        val time = holder.getView<TextView>(R.id.notice_time)
        title.text = item.title
        content.text = item.content
        time.text = item.publishTime
    }
}